﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ebooks_add.aspx.cs" Inherits="Catering.UserTraining.SlrEbooks.ebooks_add" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head2" runat="server">
    <title>添加电子书 </title>
    <link href="../css/css_modal.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../../../Style/center.css" />
    <link href="../css/css_common.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../js/js_common.js" type="text/javascript"></script>
    <script src="../js/js_modal.js" type="text/javascript"></script>
    <style type="text/css">
        .input_bg
        {
        }
    </style>
    <script type="text/javascript">
        function CheckUpFile() {
            var sKeys = "";
            if ($("#UploadList dl")!=undefined && $("#UploadList dl").find("input").val() == undefined) return true;
            $.each($("#UploadList dl"), function (i, item) {
                var name = $(this).find("dd").text();
                var address = $(this).find("input").val();
                var filesize = $(this).attr("filesize");
                sKeys += escape(name) + "," + filesize + "," + address + "┃";
            });
            if (sKeys == "") {
                alert("请先上传文件！");
                return false;
            }
            $("#hf_UploadFile").val(sKeys);
            return true;
        }

    </script>
</head>
<body>
    <form id="form2" runat="server">
    <div style="padding-left:0px; margin: 10px auto; width: 998px; height: 30px; line-height: 30px; font-size: 13px; font-weight:bold; padding-top: 0px; background: url(/Images/div_h1_bg_02.gif);">
        &nbsp;&nbsp;当前位置：电子书管理-电子书维护
    </div>
    <div style="padding-left:0px; margin: 10px auto; width: 996px; border:1px solid #C2DEF6; background-color:#E5F1FD; line-height: 30px; padding-top: 0px;">
        <table align="right">
            <tr>
                <td><asp:Button ID="btnAdd" runat="server" Text="提交" OnClientClick="return CheckUpFile()" CssClass="input_btn_a" OnClick="btnAdd_Click" /></td>
                <td>
                    <asp:Button ID="btn_Return" runat="server" CssClass="input_btn_a" Text="返回" 
                        onclick="btn_Return_Click" /></td>
                <td width="10"></td>
            </tr>
        </table>
        <div class="clear"></div>
        <table cellpadding="0" cellspacing="0">            
            <tr>
                <td width="10"></td>
                <td align="right">文档编号：</td>
                <td><asp:TextBox ID="txt_BookNo" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="10"></td>
                <td align="right" width="75">文档类别：</td>
                <td>
                    <asp:DropDownList ID="ddlBookTypeID" runat="server">
                    <asp:ListItem Value="12">类别1</asp:ListItem>
                    <asp:ListItem Value="13">类别2</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <%--<tr>
                <td width="10"></td>
                <td align="right">作者：</td>
                <td colspan="3">
                    <asp:TextBox ID="txt_BookAuthorName" runat="server" CssClass="input_bg"></asp:TextBox>
                </td>
            </tr>--%>
            <%--<tr>
                <td width="10"></td>
                <td height="30" align="right">总页数：</td>
                <td colspan="3">
                    <asp:TextBox ID="txt_PagesCount" runat="server" CssClass="input_bg" Width="136px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txt_PagesCount"
                        ErrorMessage="总页数不为空！" BorderColor="Red"></asp:RequiredFieldValidator>
                         <asp:RegularExpressionValidator ID="RegularExpressionValidator3" SetFocusOnError="True" runat="server" ControlToValidate="txt_PagesCount"
                        ErrorMessage="只能是数字!" ValidationExpression="^[0-9]*$" Display="Dynamic" BackColor="Red" />
                </td>
            </tr>--%>
            <tr>
                <td width="10"></td>                
                <td align="right">状态：</td>
                <td>
                    <asp:DropDownList ID="ddlStatus" runat="server" Width="117px">
                        <asp:ListItem Value="O">可用</asp:ListItem>
                        <asp:ListItem Value="S">不可用</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;&nbsp;<asp:CheckBox ID="chk_IsShare" Text="是否共享" runat="server" Checked="true" Visible="false" />
                </td>
            </tr>
            <tr>
                <td width="10"></td>
                <td></td>
                <td align="left">
                    <asp:HiddenField ID="hf_UploadFile" runat="server" />
                    <div id="UploadList" runat="server"></div>
                    <a class="input_btn_a" href="javascript:$_M.Open('../UpFile.aspx?ResultControl_Show=UploadList&AttachSave=2&FileTye=doc|docx|ppt|pptx|xls|xlsx|pdf&UpPath=TempUpFile/',450,320)">上传文档</a>
                </td>
            </tr>
            <tr>
                <td width="10"></td>
                <td height="40" align="right">
                    文档描述：
                </td>
                <td>
                    <asp:TextBox ID="txt_BookDesc" runat="server" Width="660px" Height="106px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td width="10">&nbsp;</td>
                <td align="center" colspan="2">
                    <asp:HiddenField ID="hid_Flag" runat="server" />
                </td>
            </tr>
        </table>
    </div>
    </form>
    <p>
        &nbsp;</p>
</body>
</html>


